package diandiansong.library.utils;

import android.content.Context;
import android.os.Looper;
import android.widget.Toast;

/**
 * Created by act on 2017/6/12.
 */

public class UIHelper {
    public static void toast(Context context, String msg) {
        if (context == null || msg == null || Looper.myLooper() == null) {
            return;
        }
        Toast.makeText(context, msg, Toast.LENGTH_SHORT).show();
    }

    public static void toast(Context context, String msg, int duration) {
        if (context == null || msg == null || Looper.myLooper() == null) {
            return;
        }
        Toast.makeText(context, msg, duration).show();
    }
}
